<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/3.3.5/css/bootstrap-theme.min.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/3.3.5/css/bootstrap.min.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/ignore.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/systemConfig.css}"/>
    <script type="text/javascript" th:src="@{/webjars/jquery/1.11.1/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/webjars/bootstrap/3.3.5/js/bootstrap.min.js}"></script>
    <script type="text/javascript" th:src="@{/webjars/angularjs/1.5.5/angular.min.js}"></script>
    <script type="text/javascript" th:src="@{/webjars/angularjs/1.5.5/angular-resource.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/common/jquery-ui-jqLoding.js}"></script>
    <script type="text/javascript" th:src="@{/js/common/bootbox.js}"></script>
    <script type="text/javascript" th:src="@{/js/common/Util.js}"></script>
    <script type="text/javascript" th:src="@{/js/systemConfig/SystemConfigModule.js(v=202112301030)}"></script>
    <script type="text/javascript" th:src="@{/js/systemConfig/SystemConfigService.js(v=202112301030)}"></script>
    <script type="text/javascript" th:src="@{/js/systemConfig/SystemConfigController.js(v=202112301030)}"></script>
    <script type="text/javascript" th:src="@{/js/config/interceptor.js}"></script>
</head>
<body ng-app="app" ng-controller="systemConfigCtrl" ng-init="init()">
<div class="div_content">
    <div class="config-menu">
        <ul class="nav nav-pills nav-stacked">
            <li id="bgsMenu" role="navigation" class="active">
                <a ng-click="changeMenu(); showConfig('bgs')">BGS</a>
            </li>
            <li id="databaseMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('database')">数据库</a>
            </li>
            <li id="mqMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('mq')">MQ</a>
            </li>
            <li id="appUploadMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('appUpload')">AppUpload</a>
            </li>
            <li id="airInfoMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('airInfo')">舱单数据</a>
            </li>
            <li id="msgUpCenterMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('msgUpCenter')">MsgUpCenter</a>
            </li>
            <li id="websiteMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('website')">地服网站</a>
            </li>
            <li id="forwarderMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('forwarder')">舱单抓取程序</a>
            </li>
            <li id="ignoreAlarmMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('ignoreAlarm')">告警配置</a>
            </li>
            <li id="roleDisableMenu" role="navigation">
                <a ng-click="changeMenu(); showConfig('roleDisable')">权限管理</a>
            </li>
        </ul>
    </div>
    <div class="config-container">
        <!-- BGS配置项 -->
        <div id="bgs" ng-show="'bgs'==showFlag">
            <form method="post" id="formBgs" name="formBgs">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>监控地址：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="healthCheck" required
                                   ng-pattern="/^((http)://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?$/"
                                   ng-maxlength="300" ng-model="bgsConfig.healthCheck" ng-value="bgsConfig.healthCheck"
                                   placeholder="http://127.0.0.1:9091/healthcheck?pretty=true" data-toggle="tooltip"
                                   data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formBgs.healthCheck.$invalid">
                                <small ng-show="formBgs.healthCheck.$error.pattern">
                                    <span class="font-error">请输入合法的监控URL</span>
                                </small>
                                <small ng-show="formBgs.healthCheck.$error.maxlength">
                                    <span class="font-error">最大长度300</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formBgs.$invalid"
                        ng-click="saveConfig('bgs', bgsConfig)">保存
                </button>
            </form>
        </div>

        <!-- 忽略告警配置项  [2024-6-18：杨家兴：系统支持对指定告警项进行声音和弹窗告警忽略的功能]-->
        <div id="ignoreAlarm" ng-show="'ignoreAlarm'==showFlag">
            <div style="width: 700px">
                <div class="ignorecontainer">
                    <span style="width: 300px;text-align: center;font-size: 18px;">告警项</span>
                    <div style="width: 200px;height: 2px"></div>
                    <span style="width: 300px;text-align: center;font-size: 18px;">忽略告警项</span>

                </div>
                <div class="ignorecontainer">
                    <div class="box">
                        <ul id="leftBox">
                            <li ng-repeat="item in ignoreAlarm.alarm| orderBy: 'id'" ng-attr-name="{{ item.id }}">{{ item.value}}</li>
                        </ul>
                    </div>
                    <div style="width: 60px;">
                        <button class="button glyphicon glyphicon-arrow-right"
                                ng-click="transferItemsRight('leftBox', 'rightBox',ignoreAlarm.alarm,ignoreAlarm.ignore)"
                                id="toRightButton" disabled></button>
                        <div style="height: 5px;"></div>
                        <button class="button glyphicon glyphicon-arrow-left"
                                ng-click="transferItemsLeft('rightBox', 'leftBox',ignoreAlarm.ignore,ignoreAlarm.alarm)"
                                id="toLeftButton" disabled></button>
                    </div>
                    <div class="box">
                        <ul id="rightBox">
                            <li ng-repeat="item in ignoreAlarm.ignore| orderBy: 'id'" ng-attr-name="{{ item.id }}">{{ item.value}}</li>
                        </ul>
                    </div>
                </div>
            </div>
            <button class="btn btn-primary submit-btn" ng-disabled="ignoreAlarm.$invalid"
                    ng-click="saveConfig('ignoreAlarm', ignoreAlarm)">保存
            </button>

        </div>

        <!-- 角色权限项   [2024-6-24：杨家兴：添加管理员对普通用户重启操作的授权]-->
        <div id="roleDisable" ng-show="'roleDisable'==showFlag">
            <div style="width: 700px">
                <div class="container mt-5" style="padding-left:100px;display: flex;align-items:center">
                    <span>普通用户：</span>
                    <input type="checkbox" id="subscribe" ng-click="clickSubscribe()" name="subscribe">
                    <label for="subscribe" style="margin-bottom: 0px">重启服务</label>
                </div>
            </div>
            <button class="btn btn-primary submit-btn" ng-disabled="roleDisable.$invalid"
                    ng-click="saveConfig('roleDisable', roleDisable)">保存
            </button>

        </div>

        <!-- 数据库配置项 -->
        <div id="database" ng-show="'database'==showFlag">
            <form method="post" id="formDatabase" name="formDatabase">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>进程比黄色警告（%）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="warn" required
                                   ng-model="databaseConfig.warn" ng-pattern="/^[0-9]{0,3}$/" ng-maxlength="3"
                                   ng-value="databaseConfig.warn" data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formDatabase.warn.$invalid">
                                <small ng-show="formDatabase.warn.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formDatabase.warn.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>进程比红色警告（%）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="error" required
                                   ng-model="databaseConfig.error" ng-pattern="/^[0-9]{0,3}$/" ng-maxlength="3"
                                   ng-value="databaseConfig.error" data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formDatabase.error.$invalid">
                                <small ng-show="formDatabase.error.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formDatabase.error.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>磁盘使用率警告（%）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="diskUsage" required
                                   ng-model="databaseConfig.diskUsage" ng-pattern="/^[0-9]{0,3}$/" ng-maxlength="3"
                                   ng-value="databaseConfig.diskUsage" data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formDatabase.diskUsage.$invalid">
                                <small ng-show="formDatabase.diskUsage.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formDatabase.diskUsage.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>表空间使用率警告（%）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="tablespaceUsage" required
                                   ng-model="databaseConfig.tablespaceUsage" ng-pattern="/^[0-9]{0,3}$/"
                                   ng-maxlength="3" ng-value="databaseConfig.tablespaceUsage" data-toggle="tooltip"
                                   data-placement="top" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formDatabase.tablespaceUsage.$invalid">
                                <small ng-show="formDatabase.tablespaceUsage.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formDatabase.tablespaceUsage.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formDatabase.$invalid"
                        ng-click="saveConfig('database', databaseConfig)">保存
                </button>
            </form>
        </div>

        <!-- MQ配置项 -->
        <div id="mq" ng-show="'mq'==showFlag">
            <form method="post" id="formMq" name="formMq">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>MQ地址：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="url" required ng-model="mqConfig.url"
                                   ng-pattern="/^(service:jmx:rmi:///jndi/rmi://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?$/"
                                   ng-maxlength="300" ng-value="mqConfig.url"
                                   placeholder="service:jmx:rmi:///jndi/rmi://127.0.0.1:1093/jmxrmi"
                                   data-toggle="tooltip" data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMq.url.$invalid">
                                <small ng-show="formMq.url.$error.pattern">
                                    <span class="font-error">请输入合法的MQ地址</span>
                                </small>
                                <small ng-show="formMq.url.$error.maxlength">
                                    <span class="font-error">最大长度300</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>MsgUpCenter接收：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="uplinkTopic" required
                                   ng-model="mqConfig.uplinkTopic" ng-pattern="/^[0-9A-Za-z\._-]+$/" ng-maxlength="50"
                                   ng-value="mqConfig.uplinkTopic" data-toggle="tooltip" data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMq.uplinkTopic.$invalid">
                                <small ng-show="formMq.uplinkTopic.$error.pattern">
                                    <span class="font-error">请输入合法的名称</span>
                                </small>
                                <small ng-show="formMq.uplinkTopic.$error.maxlength">
                                    <span class="font-error">最大长度50</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>AppUpload接收：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="downlinkTopic" required
                                   ng-model="mqConfig.downlinkTopic" ng-pattern="/^[0-9A-Za-z\._-]+$/" ng-maxlength="50"
                                   ng-value="mqConfig.downlinkTopic" data-toggle="tooltip" data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMq.downlinkTopic.$invalid">
                                <small ng-show="formMq.downlinkTopic.$error.pattern">
                                    <span class="font-error">请输入合法的名称</span>
                                </small>
                                <small ng-show="formMq.downlinkTopic.$error.maxlength">
                                    <span class="font-error">最大长度50</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formMq.$invalid"
                        ng-click="saveConfig('mq', mqConfig)">保存
                </button>
            </form>
        </div>

        <!-- AppUpLoad配置项 -->
        <div id="appUpload" ng-show="'appUpload'==showFlag">
            <form method="post" id="formAppUpload" name="formAppUpload">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>UDP-HOST：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="host" required
                                   ng-model="appUploadConfig.udp.host"
                                   ng-pattern="/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/" ng-maxlength="15"
                                   ng-value="appUploadConfig.udp.host" data-toggle="tooltip" data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formAppUpload.host.$invalid">
                                <small ng-show="formAppUpload.host.$error.pattern">
                                    <span class="font-error">请输入合法的HOST</span>
                                </small>
                                <small ng-show="formAppUpload.host.$error.maxlength">
                                    <span class="font-error">最大长度15</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>UDP-PORT：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="port" required
                                   ng-model="appUploadConfig.udp.port" ng-pattern="/^[1-9]{1}[0-9]{0,4}$/"
                                   ng-maxlength="5" ng-value="appUploadConfig.udp.port" data-toggle="tooltip"
                                   data-placement="top" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formAppUpload.port.$invalid">
                                <small ng-show="formAppUpload.port.$error.pattern">
                                    <span class="font-error">请输入合法的PORT</span>
                                </small>
                                <small ng-show="formAppUpload.port.$error.maxlength">
                                    <span class="font-error">最大长度5</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>UDP心跳超时（s）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="timeout" required
                                   ng-model="appUploadConfig.udp.timeout" ng-pattern="/^[0-9]{0,5}$/" ng-maxlength="5"
                                   ng-value="appUploadConfig.udp.timeout" data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formAppUpload.timeout.$invalid">
                                <small ng-show="formAppUpload.timeout.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formAppUpload.timeout.$error.maxlength">
                                    <span class="font-error">最大长度5</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>拆分失败率告警阀值（%）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="failureAlarm" required
                                   ng-model="appUploadConfig.msgSplit.failureAlarm" ng-pattern="/^[0-9]{0,3}$/"
                                   ng-maxlength="3" ng-value="appUploadConfig.msgSplit.failureAlarm"
                                   data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formAppUpload.failureAlarm.$invalid">
                                <small ng-show="formAppUpload.failureAlarm.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formAppUpload.failureAlarm.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>NTP时间告警阈值（min）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="alarmTime" required
                                   ng-model="appUploadConfig.ntp.alarmTime" ng-pattern="/^[0-9]{0,3}$/" ng-maxlength="3"
                                   ng-value="appUploadConfig.ntp.alarmTime" data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formAppUpload.alarmTime.$invalid">
                                <small ng-show="formAppUpload.alarmTime.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formAppUpload.alarmTime.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formAppUpload.$invalid"
                        ng-click="saveConfig('appUpload', appUploadConfig)">保存
                </button>
            </form>
        </div>

        <!-- 航信接口配置项 -->
        <div id="airInfo" ng-show="'airInfo'==showFlag">
            <form method="post" id="formAirInfo" name="formAirInfo">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>MQ地址：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="url" required
                                   ng-model="airInfoConfig.url"
                                   ng-pattern="/^(service:jmx:rmi:///jndi/rmi://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?$/"
                                   ng-maxlength="300" ng-value="airInfoConfig.url"
                                   placeholder="service:jmx:rmi:///jndi/rmi://127.0.0.1:1093/jmxrmi"
                                   data-toggle="tooltip" data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formAirInfo.url.$invalid">
                                <small ng-show="formAirInfo.url.$error.pattern">
                                    <span class="font-error">请输入合法的MQ地址</span>
                                </small>
                                <small ng-show="formAirInfo.url.$error.maxlength">
                                    <span class="font-error">最大长度300</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>TOPIC：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="topic" required
                                   ng-model="airInfoConfig.topic" ng-pattern="/^[0-9A-Za-z\._-]+$/" ng-maxlength="50"
                                   ng-value="airInfoConfig.topic" data-toggle="tooltip" data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formAirInfo.topic.$invalid">
                                <small ng-show="formAirInfo.topic.$error.pattern">
                                    <span class="font-error">请输入合法的名称</span>
                                </small>
                                <small ng-show="formAirInfo.topic.$error.maxlength">
                                    <span class="font-error">最大长度50</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">报文告警时间阈值：</td>
                        <td class="td-left">UTC 单位（min）</td>
                    </tr>
                    <tr class="msgAlarmContent" ng-repeat="a in airInfoConfig.msgAlarm">
                        <td class="config-title"></td>
                        <td class="config-content">
                            <input id="name{{$index + 1}}" name="name" type="text" required hidden readonly
                                   value="{{ a.name }}"/>
                            <input id="startTime{{$index + 1}}" class="float-left form-control config-time"
                                   name="startTime" type="time" required value="{{a.startTime}}"
                                   onchange="changeStartTime(this)" data-toggle="tooltip" data-placement="top"/>
                            <input id="endTime{{$index + 1}}" class="float-left form-control config-time" name="endTime"
                                   type="time" required value="{{a.endTime}}" onchange="changeEndTime(this)"
                                   data-toggle="tooltip" data-placement="top"/>
                            <input id="timeout{{$index + 1}}" class="float-left form-control config-timeout"
                                   name="timeout" type="text" required value="{{ a.timeout }}"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,''); changeTimeout(this)"
                                   data-toggle="tooltip" data-placement="top"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div>
                                <small>
                                    <span id="timeoutError{{$index + 1}}" class="font-error"></span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formAirInfo.$invalid || msgAlarmInvalid"
                        ng-click="saveConfig('airInfo', buildAirInfoConfig(airInfoConfig))">保存
                </button>
            </form>
        </div>

        <!-- MsgUpCenter配置项 -->
        <div id="msgUpCenter" ng-show="'msgUpCenter'==showFlag">
            <form method="post" id="formMsgUpCenter" name="formMsgUpCenter">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>UDP-HOST：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="host" required
                                   ng-model="msgUpCenterConfig.udp.host"
                                   ng-pattern="/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/" ng-maxlength="15"
                                   ng-value="msgUpCenterConfig.udp.host" data-toggle="tooltip" data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMsgUpCenter.host.$invalid">
                                <small ng-show="formMsgUpCenter.host.$error.pattern">
                                    <span class="font-error">请输入合法的HOST</span>
                                </small>
                                <small ng-show="formMsgUpCenter.host.$error.maxlength">
                                    <span class="font-error">最大长度15</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>UDP-PORT：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="port" required
                                   ng-model="msgUpCenterConfig.udp.port" ng-pattern="/^[1-9]{1}[0-9]{0,4}$/"
                                   ng-maxlength="5" ng-value="msgUpCenterConfig.udp.port" data-toggle="tooltip"
                                   data-placement="top" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMsgUpCenter.port.$invalid">
                                <small ng-show="formMsgUpCenter.port.$error.pattern">
                                    <span class="font-error">请输入合法的PORT</span>
                                </small>
                                <small ng-show="formMsgUpCenter.port.$error.maxlength">
                                    <span class="font-error">最大长度5</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>UDP心跳超时（s）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="timeout" required
                                   ng-model="msgUpCenterConfig.udp.timeout" ng-pattern="/^[0-9]{0,5}$/" ng-maxlength="5"
                                   ng-value="msgUpCenterConfig.udp.timeout" data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMsgUpCenter.timeout.$invalid">
                                <small ng-show="formMsgUpCenter.timeout.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formMsgUpCenter.timeout.$error.maxlength">
                                    <span class="font-error">最大长度5</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>NTP时间告警阈值（min）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="alarmTime" required
                                   ng-model="msgUpCenterConfig.ntp.alarmTime" ng-pattern="/^[0-9]{0,3}$/"
                                   ng-maxlength="3" ng-value="msgUpCenterConfig.ntp.alarmTime" data-toggle="tooltip"
                                   data-placement="top" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMsgUpCenter.alarmTime.$invalid">
                                <small ng-show="formMsgUpCenter.alarmTime.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formMsgUpCenter.alarmTime.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>折线图X轴跨度（min）：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="timespan" required
                                   ng-model="msgUpCenterConfig.lineChart.timespan" ng-pattern="/^[0-9]{0,3}$/"
                                   ng-maxlength="3" ng-value="msgUpCenterConfig.lineChart.timespan"
                                   data-toggle="tooltip" data-placement="top"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMsgUpCenter.timespan.$invalid">
                                <small ng-show="formMsgUpCenter.timespan.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formMsgUpCenter.timespan.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>折线图点数：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="points" required
                                   ng-model="msgUpCenterConfig.lineChart.points" ng-pattern="/^[0-9]{0,3}$/"
                                   ng-maxlength="3" ng-value="msgUpCenterConfig.lineChart.points" data-toggle="tooltip"
                                   data-placement="top" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/>
                        </td>
                        <td class="error">
                            <div ng-show="formMsgUpCenter.points.$invalid">
                                <small ng-show="formMsgUpCenter.points.$error.pattern">
                                    <span class="font-error">请输入数字</span>
                                </small>
                                <small ng-show="formMsgUpCenter.points.$error.maxlength">
                                    <span class="font-error">最大长度3</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formMsgUpCenter.$invalid"
                        ng-click="saveConfig('msgUpCenter', msgUpCenterConfig)">保存
                </button>
            </form>
        </div>

        <!-- 地服网站配置项 -->
        <div id="website" ng-show="'website'==showFlag">
            <form method="post" id="formWebsite" name="formWebsite">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>网站地址1：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="url1" required
                                   ng-model="websiteConfig.url1"
                                   ng-pattern="/^((http)://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?$/"
                                   ng-maxlength="300" ng-value="websiteConfig.url1"
                                   placeholder="http://127.0.0.1:8080/index" data-toggle="tooltip"
                                   data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formWebsite.url1.$invalid">
                                <small ng-show="formWebsite.url1.$error.pattern">
                                    <span class="font-error">请输入合法的网站地址</span>
                                </small>
                                <small ng-show="formWebsite.url1.$error.maxlength">
                                    <span class="font-error">最大长度300</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>网站地址2：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="url2" required
                                   ng-model="websiteConfig.url2"
                                   ng-pattern="/^((http)://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?$/"
                                   ng-maxlength="300" ng-value="websiteConfig.url2"
                                   placeholder="http://127.0.0.1:8080/index" data-toggle="tooltip"
                                   data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formWebsite.url2.$invalid">
                                <small ng-show="formWebsite.url2.$error.pattern">
                                    <span class="font-error">请输入合法的网站地址</span>
                                </small>
                                <small ng-show="formWebsite.url2.$error.maxlength">
                                    <span class="font-error">最大长度300</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formWebsite.$invalid"
                        ng-click="saveConfig('website', websiteConfig)">保存
                </button>
            </form>
        </div>

        <!-- 舱单抓取程序配置项 -->
        <div id="forwarder" ng-show="'forwarder'==showFlag">
            <form method="post" id="formForwarder" name="formForwarder">
                <table class="table">
                    <tr>
                        <td class="config-title">
                            <span>监控地址1：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="healthUrl1" required
                                   ng-pattern="/^((http)://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?$/"
                                   ng-maxlength="300" ng-model="forwarderConfig.healthUrl1"
                                   ng-value="forwarderConfig.healthUrl1"
                                   placeholder="http://127.0.0.1:9091/actuator/health" data-toggle="tooltip"
                                   data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formForwarder.healthUrl1.$invalid">
                                <small ng-show="formForwarder.healthUrl1.$error.pattern">
                                    <span class="font-error">请输入合法的监控URL</span>
                                </small>
                                <small ng-show="formForwarder.healthUrl1.$error.maxlength">
                                    <span class="font-error">最大长度300</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="config-title">
                            <span>监控地址2：</span>
                        </td>
                        <td>
                            <input class="form-control bubbling" type="text" name="healthUrl2" required
                                   ng-pattern="/^((http)://)(([a-zA-Z0-9\._-]+\.[a-zA-Z]{2,6})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\&%_\./-~-]*)?$/"
                                   ng-maxlength="300" ng-model="forwarderConfig.healthUrl2"
                                   ng-value="forwarderConfig.healthUrl2"
                                   placeholder="http://127.0.0.1:9091/actuator/health" data-toggle="tooltip"
                                   data-placement="top"/>
                        </td>
                        <td class="error">
                            <div ng-show="formForwarder.healthUrl2.$invalid">
                                <small ng-show="formForwarder.healthUrl2.$error.pattern">
                                    <span class="font-error">请输入合法的监控URL</span>
                                </small>
                                <small ng-show="formForwarder.healthUrl2.$error.maxlength">
                                    <span class="font-error">最大长度300</span>
                                </small>
                            </div>
                        </td>
                    </tr>
                </table>
                <button class="btn btn-primary submit-btn" ng-disabled="formForwarder.$invalid"
                        ng-click="saveConfig('forwarder', forwarderConfig)">保存
                </button>
            </form>
        </div>
    </div>
    <script type="text/javascript" th:src="@{/js/common/ignore.js}"></script>

</div>
</body>
</html>
